PORTNAME=	compiz-plugins-extra
PORTVERSION=	0.8.18
CATEGORIES=	x11-wm
MASTER_SITES=	https://gitlab.com/compiz/${PORTNAME}/uploads/b53eb95252331d53b42231778f55de44/

PATCH_SITES=	https://gitlab.com/compiz/${PORTNAME}/-/commit/
PATCHFILES+=	2564453e.patch:-p1
PATCHFILES+=	13a731bf.patch:-p1

MAINTAINER=	samy.mahmoudi@gmail.com
COMMENT=	Plugins for Compiz Composite Window Manager
WWW=		https://gitlab.com/compiz/compiz-plugins-extra

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	compiz:x11-wm/compiz \
		bcop:devel/compiz-bcop \
		compiz-plugins-main>0:x11-wm/compiz-plugins-main
LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
		libfreetype.so:print/freetype2 \
		libharfbuzz.so:print/harfbuzz \
		libnotify.so:devel/libnotify \
		libstartup-notification-1.so:x11/startup-notification
RUN_DEPENDS:=	${BUILD_DEPENDS}

USES=		gettext gmake gl gnome libtool:keepla localbase:ldflags \
		pathfix pkgconfig tar:xz xorg
USE_GL=		glu
USE_CSTD=	gnu89
USE_GNOME=	cairo gdkpixbuf2 intltool libxslt pango
USE_XORG=	ice sm x11 xcomposite xcursor xdamage xext xfixes xi \
		xinerama xorgproto xrandr xrender
USE_LDCONFIG=	yes

CONFIGURE_ARGS=	--disable-static
GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip

post-patch:
	@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|'	\
		${WRKSRC}/src/group/group-internal.h	\

.include <bsd.port.mk>
